package 笔试2.pdd.one;

import java.util.Scanner;

/*
5
1 3 5 2 4
3
4 2 7
 */
//书架放书 二分查找
public class Main {
    public static void main(String[] args) {
        int[] p = {1,3,5,2,4}; int n=5;
        int[] q={4,2,7}; int n2=3;

        Scanner sc = new Scanner(System.in);
        n=sc.nextInt();
        p=new int[n];
        for (int i = 0; i < n; i++) {
            p[i]=sc.nextInt();
        }
        n2=sc.nextInt();
        q=new int[n2];
        for (int i = 0; i < n2; i++) {
            q[i]=sc.nextInt();
        }

        int[] pp = new int[p.length];
        pp[0]=p[0];
        for (int i = 1; i < p.length; i++) {
            pp[i]=pp[i-1]+p[i];
        }


        for (int i = 0; i < n2; i++) {
            int target=q[i];
            int left = 0, right = pp.length - 1;
            while (left<right){
                int mid=left+right>>1;
                if(pp[mid]>=target)right=mid;
                else left=mid+1;
            }
            System.out.println(left+1);
        }

    }
}
